package com.ruoyi.zd.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zd.mapper.InsurancePaymentRecordsMapper;
import com.ruoyi.zd.domain.InsurancePaymentRecords;
import com.ruoyi.zd.service.IInsurancePaymentRecordsService;

/**
 * 保险缴费主记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-06
 */
@Service
public class InsurancePaymentRecordsServiceImpl implements IInsurancePaymentRecordsService 
{
    @Autowired
    private InsurancePaymentRecordsMapper insurancePaymentRecordsMapper;

    /**
     * 查询保险缴费主记录
     * 
     * @param id 保险缴费主记录主键
     * @return 保险缴费主记录
     */
    @Override
    public InsurancePaymentRecords selectInsurancePaymentRecordsById(Long id)
    {
        return insurancePaymentRecordsMapper.selectInsurancePaymentRecordsById(id);
    }

    /**
     * 查询保险缴费主记录列表
     * 
     * @param insurancePaymentRecords 保险缴费主记录
     * @return 保险缴费主记录
     */
    @Override
    public List<InsurancePaymentRecords> selectInsurancePaymentRecordsList(InsurancePaymentRecords insurancePaymentRecords)
    {
        return insurancePaymentRecordsMapper.selectInsurancePaymentRecordsList(insurancePaymentRecords);
    }

    /**
     * 新增保险缴费主记录
     * 
     * @param insurancePaymentRecords 保险缴费主记录
     * @return 结果
     */
    @Override
    public int insertInsurancePaymentRecords(InsurancePaymentRecords insurancePaymentRecords)
    {
        return insurancePaymentRecordsMapper.insertInsurancePaymentRecords(insurancePaymentRecords);
    }

    /**
     * 修改保险缴费主记录
     * 
     * @param insurancePaymentRecords 保险缴费主记录
     * @return 结果
     */
    @Override
    public int updateInsurancePaymentRecords(InsurancePaymentRecords insurancePaymentRecords)
    {
        return insurancePaymentRecordsMapper.updateInsurancePaymentRecords(insurancePaymentRecords);
    }

    /**
     * 批量删除保险缴费主记录
     * 
     * @param ids 需要删除的保险缴费主记录主键
     * @return 结果
     */
    @Override
    public int deleteInsurancePaymentRecordsByIds(Long[] ids)
    {
        return insurancePaymentRecordsMapper.deleteInsurancePaymentRecordsByIds(ids);
    }

    /**
     * 删除保险缴费主记录信息
     * 
     * @param id 保险缴费主记录主键
     * @return 结果
     */
    @Override
    public int deleteInsurancePaymentRecordsById(Long id)
    {
        return insurancePaymentRecordsMapper.deleteInsurancePaymentRecordsById(id);
    }


    @Override
    public int updateEmployeeInsurancePlan(String employeeNumber, Long insurancePlanId) {
        return insurancePaymentRecordsMapper.updateEmployeeInsurancePlan(employeeNumber, insurancePlanId);

    }


    @Override
    public InsurancePaymentRecords selectPaymentSums(String paymentMonth) {
        return insurancePaymentRecordsMapper.selectPaymentSums(paymentMonth);
    }
}
